<?php

$v_status = -1;
if(isset($_REQUEST['hdn_status'])){	
	$v_status = intval($_REQUEST['hdn_status']);
}

$v_method = 1;

$v_filter = "";
if(isset($_REQUEST['hdn_filter'])){
	$v_filter = _replace_bad_char($_REQUEST['hdn_filter']);
}

$v_agency_id = 0;
if(isset($_REQUEST['hdn_agency_id'])){
	$v_agency_id = intval($_REQUEST['hdn_agency_id']);
}

$v_cate_id = 0;
if(isset($_REQUEST['hdn_cate_id'])){
	$v_cate_id = intval($_REQUEST['hdn_cate_id']);
} 

$v_date_start_sp = "";
$v_date_end_sp = "";
$v_limit = 10;
$v_page=1;
$v_staff_id=  $_SESSION['staff_id'];
$v_number_qa_question_per_page = 10;
$v_filter = "%". $v_filter . "%";
if(_is_sqlserver()){
	$sql = "Exec Onegate_QAGetAllPerPage " ;
	$sql = $sql. $v_status.",";
	$sql = $sql. $v_method.",";
	$sql = $sql."'".$v_filter."',";
	$sql = $sql. $v_agency_id.",";
	$sql = $sql. $v_cate_id.",";
	$sql = $sql."'".$v_date_start_sp."',";
	$sql = $sql."'".$v_date_end_sp."'";
	$sql = $sql.",".$v_page;
	$sql = $sql.",".$v_limit;
	//echo $sql; //exit;
	$ado_conn->SetFetchMode(ADODB_FETCH_ASSOC);
	$arr_all_onegate_qa = $ado_conn->GetAll($sql); 
	$v_qa_count=sizeof($arr_result);
}
$v_total_qa = $arr_all_onegate_qa[0]['TOTAL_QA'];
?>